import React, { Component } from 'react';
import { Swiper } from 'antd-mobile';
// import "../../components/MySwiper/swiper.css"


// interface Props {
//     swiperlist:any[]
// }
class MySwiper extends Component {
    constructor (){
        super();
        this.state={
            swiperlist:[
                
            ]
        }
    }
    render() {
        return (
            <div className="swiperbox">
                <Swiper className='myswiper' autoplay loop autoplayInterval={1000}>
                {
                    this.props.swiperlist.map((item,index)=>{
                        return (
                            <Swiper.Item key={index}>
                                <img src={item.img} alt="" />
                            </Swiper.Item>
                        )
                    })
                }
            </Swiper>
            </div>
        );
    }
}

export default MySwiper;